]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: Stop using anchor point
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 5 Jun 2019 14:46:35 +0000 (14:46 +0000)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 5 Jun 2019 17:59:51 +0000 (17:59 +0000)
Since the removal of the old (pre-3.16) message tray, legacy tray icons
are very unlikely to be placed in a container that is animated using the
deprecated anchor point.

Just assume that the regular stage position is good enough.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/572

src/shell-gtk-embed.c

index 057f877cb2721bbbf571b7494eef37a0a5cd6668..6d3a66466227765097e71680b44277ee84eea544 100644 (file)
@@ -280,7 +280,7 @@ shell_gtk_embed_allocate (ClutterActor          *actor,
 {
   ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
   ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
-  float wx = 0.0, wy = 0.0, x, y, ax, ay;
+  float wx, wy;
 
   CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->
     allocate (actor, box, flags);
@@ -288,16 +288,7 @@ shell_gtk_embed_allocate (ClutterActor          *actor,
   /* Find the actor's new coordinates in terms of the stage (which is
    * priv->window's parent window.
    */
-  while (actor)
-    {
-      clutter_actor_get_position (actor, &x, &y);
-      clutter_actor_get_anchor_point (actor, &ax, &ay);
-
-      wx += x - ax;
-      wy += y - ay;
-
-      actor = clutter_actor_get_parent (actor);
-    }
+  clutter_actor_get_transformed_position (actor, &wx, &wy);
 
   _shell_embedded_window_allocate (priv->window,
                                    (int)(0.5 + wx), (int)(0.5 + wy),